<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>我的用户中心</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/css/main.css">
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/css/style_userCenter.css">
	
 	<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/jquery-1.6.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/jquery.validate.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/additional-methods.js" charset="utf-8"></script>

		<script type="text/javascript">
		$(document).ready(function() {
		$("#authPhoneForm").validate({
			errorPlacement: function(error, element) {
				 //element.parent("td").append(error);
				 element.attr("title", error.html());
			},
			rules : {
				"phone" : {
					required : true,
					mobile: true					
				},
				"vcode":
				{
					required : true
				}
			},

			messages : {
				"phone" : {
					required : "请输入电话号码",
					mobile: "请输入正确的电话号码"
				},
				"vcode":
				{
					required : "请输入验证码"
				}
			}
			
			//debug : true
		});
	});
	</script>

  </head>
  <body>
	<div>
		<jsp:include page="../nav.jsp">
			<jsp:param value="nav_account" name="nav"/>
		</jsp:include>
	</div>
	<div class="realCer">
	
	<!--主体部分-->
	<div class="realMain clearfix mt10">
	 <!--左侧菜单-->
	<div class="realLeft" id="meunLeft">
	    <jsp:include page="../leftMenu.jsp">
	    	<jsp:param value="con_nav_account" name="con_nav"/>
	    	<jsp:param value="phoneAuth" name="selectMenu"/>
	    </jsp:include>
    </div>
    <!--中由-->
	<div class="realRight ml10">
		<!--中间-->
		<div class="realR_left">
			<div class="box">
				<div class="tit">手机号码认证</div>
				<div class="con">
					<div class="form_wrap clearfix">
			<div style="color: red; margin-left: 100px;">
				<s:property value="resultMsg" />
				<s:fielderror></s:fielderror>
			</div>
			<s:url var="authPhoneURL" action="authPhone.action" namespace="/auth"></s:url>
			<form method="post" id="authPhoneForm" name="authPhoneForm"
				action="<s:property value="#authPhoneURL"/>">
				<dl>
					<dt>
						<label for="address.username">
							请输入正确的手机号码:
						</label>
					</dt>
					<dd>
						<input name="phone" id="phone" type="text"/><input onclick="sendCode()" type="button" value="获取手机验证码"/>
						<span id="sendCode_msg"></span>
					</dd>
				</dl>
				<dl>
					<dt>
						<label>
						    验证码:
						</label>
					</dt>
					<dd>
						<input type="text" value="" name="vcode" id="vcode"/>
					</dd>
				</dl>
				<dl>
					<dt>
						&nbsp;
					</dt>
					<dd>
						<input type="submit" id="button_submit" class="regbtn"
							value="确认" />
					</dd>
				</dl>
			</form>
		</div>
				</div>
			</div>
		</div>
		<!-- 中间 -->
		<!--右侧-->
		<div class="realR_right">	
				
			<div class="box mb10">
				<div class="tit">雇主说</div>
				<div class="con">			
				  44444444444444
				</div>
			</div>
			
		</div>
		<!--右侧-->
	</div>
	<!--中由-->
</div>
</div>
	<div>
		<jsp:include page="/footer.jsp"></jsp:include>
	</div>
	<script type="text/javascript">
	function sendCode()
	{
		$.ajax({
	               type: "POST",
	               url: "${pageContext.request.contextPath}/code/sendCode.action",
	               data: {"phone" : $("#phone").val()},
	               dataType: "json",
	               success: function(data) 
	               {
						$("#sendCode_msg").html(data.result.message);
				   },
				   error: function()
				   {
				        $("#sendCode_msg").html("系统忙，请稍后再试。");
				   }
    	});
	}
	</script>
    </body>
</html>
